/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package checador;


import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;


 /**
 *
 * @author lynx
 */
public class Checador extends JFrame {
    
    private reloj reloj;
    JTextField id = new JTextField(2);
    JButton Boton = new JButton();
    JLabel  NEM =   new JLabel();
    /**
     *
     */
    public String ID;
    /**
     *
     * @param
     */
    public Checador(){
        
        super("Checador");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setSize(300, 300);
        setLocationRelativeTo(null);
        setLayout(null);
        
        reloj = new reloj();
        reloj.setBounds(20, 20, 150, 30);
        
        this.add(reloj);
        this.setVisible(true);
        
        this.add(id);
        id.setBounds(50, 50, 180, 30);
        this.add(Boton);
        Boton.setBounds(50, 80, 60, 30);
        this.add(NEM);
        NEM.setBounds(50, 120, 200, 30);
                
               
        
        
        id.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
              
                 ID = id.getText();
                 
            }
        });
        
        Boton.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
               Empleado emp = new Empleado();
                emp.buscar(ID);
                NEM.setText(Empleado.nombreEmpleado);
                
                
            }
        });
        
    }
    
    public static void main(String[] args) {

        new Checador();
        
        
    }
    
    public static void capturar(){
    
        
    
    }
    
    public static void mostrarNombre(){
    
    
    
    }
    
    public static void mostrarHoraActual(){
    
    
    
    }

   
    
        
}
